<%@ page language="java" contentType="text/html;charset=UTF-8"%>
<%@ page import="com.wabacus.system.*,com.wabacus.util.*" %>
<%
String path=request.getContextPath();
ReportRequest rrequest=(ReportRequest)request.getAttribute("WX_REPORTREQUEST");
int size = rrequest.getReportDataListSize("report1"),k=0;
if(size>0){
	for(int i=0;i<size;i++){
		int level=Integer.parseInt(rrequest.getColDisplayValue("report1","Level",i),10);//目录级别
		String MenuName=rrequest.getColDisplayValue("report1","MenuName",i);//菜单名称
		String URL=rrequest.getColDisplayValue("report1","URL",i);//页面URL
		String Target=rrequest.getColDisplayValue("report1","Target",i);//目标窗口
		String TabGroup=rrequest.getColDisplayValue("report1","TabGroup",i);//标签组
		String External=rrequest.getColDisplayValue("report1","External",i);//是否外部调用
		String MenuID=rrequest.getColDisplayValue("report1","MenuID",i);//菜单ID
		String style=rrequest.getColDisplayValue("report1","style",i);//菜单样式
		String SpecialAttributes=rrequest.getColDisplayValue("report1","SpecialAttributes",i);//特定属性
		SpecialAttributes=Tools.htmlDecode(SpecialAttributes);
		if(level<=1){
			if(i>0)out.println("</ul></div>");
			out.println("<div class=\"accordionHeader\"><h2 " + ((style!=null && style.trim().length()>0)?"style=\"" + style + "\" ":"") + SpecialAttributes + "><span>Folder</span>"+MenuName+"</h2></div><div class=\"accordionContent\">");
		}
		else{
			if(level<k){
				for(int j=k;j>1;j--){
					if(j>2){
						out.print("</ul>");
					}
					else{
						out.print("</li>");
					}
				}
			}
			if(level>k){
				if(level==2){
					out.print("<ul class=\"tree treeFolder\">");
				}
				else{
					out.print("<ul>");
				}
			}
			if(URL!=null && URL.trim().length()>0){
				if(URL.indexOf("://")>0){
					out.print("<li><a id=\"MenuID_"+MenuID+"\" href=\"" + URL + "\" " + ((style!=null && style.trim().length()>0)?"style=\"" + style + "\" ":"") + SpecialAttributes + " target=\""+ Target +"\" rel=\""+ TabGroup +"\" external=\""+ External +"\" fresh=\"true\" title=\""+ MenuName +"\">"+ MenuName +"</a>");
				}
				else{
					out.print("<li><a id=\"MenuID_"+MenuID+"\" href=\"" + path + URL + "\" " + ((style!=null && style.trim().length()>0)?"style=\"" + style + "\" ":"") + SpecialAttributes + " target=\""+ Target +"\" rel=\""+ TabGroup +"\" external=\""+ External +"\" fresh=\"true\" title=\""+ MenuName +"\">"+ MenuName +"</a>");
				}
			}
			else{
				out.print("<li><a id=\"MenuID_"+MenuID+"\" "+ ((style!=null && style.trim().length()>0)?"style=\"" + style + "\" ":"") + SpecialAttributes + " title=\""+ MenuName +"\">"+ MenuName +"</a>");
			}
		}
		if(i==(size-1)){
			out.println("</div>");
		}
		k=level;
	}
}
else{
	%>
	没有数据
	<%
}
%>